home *** CD-ROM | disk | FTP | other *** search
/ Space & Astronomy / Space and Astronomy (October 1993).iso / pc / programs / mac / almanac.sit / Almanac v1.8 / card_10200.txt < prev    next >
Text File  |  1990-04-21  |  5KB  |  195 lines

  1. -- card: 10200 from stack: in.8
  2. -- bmap block id: 10246
  3. -- flags: 0000
  4. -- background id: 6859
  5. -- name: meteor
  6. ----- HyperTalk script -----
  7. on openCard
  8.   hide cd fld data
  9.   put "("& word 4 of the long date&")" into cd fld year
  10.   pass openCard
  11. end openCard
  12.  
  13. on mcalc
  14.   get word 4 of the long date
  15.   if it Γëá last word of cd fld data then meteor
  16. end mcalc
  17.  
  18. on meteor
  19.   global h,m,intl
  20.   put "                              " into spaces
  21.   put empty into cd fld meteors
  22.   put number of lines of cd fld data into lin
  23.   repeat with i=1 to lin-1
  24.     put line i of cd fld data into mdat
  25.     put item 1 of mdat into shower
  26.     put item 2 of mdat into s0
  27.     put item 3 of mdat into s1
  28.     put item 4 of mdat into j5
  29.     put word 4 of the long date into y
  30.     put y into line lin of cd fld data
  31.     put number of chars of shower into nch
  32.     put word 4 of the long date into y
  33.     put (y-1950)/100 into t5
  34.     put s0+t5*(s1+1.39663+.0003*t5) mod 360 into s
  35.     put j5+t5*(36525.636+s1) into j
  36.     repeat 2
  37.       set cursor to busy
  38.       put (j+17980)/36525 into t
  39.       put 279.7+t*(36000.769+.0003*t) into l
  40.       put 358.48+t*(35999.05-.0002*t)into m
  41.       put (l+sind(m)*(1.92-.005*t)+.02*sind(2*m)) mod 360 into s5
  42.       subtract (s5-s)/(.986+.033*cosd(m)) from j
  43.     end repeat
  44.     put (j+16519.5-DSTCheck()/24) into jd
  45.     put jd*86400 into sec
  46.     put sec - sec mod 1 into sec
  47.     convert sec to dateItems
  48.     if intl is empty then
  49.       get char 2 to 4 of last word of line 4 of cd fld coords of cd origin
  50.       if item 2 of sec<4 or item 2 of sec>10 then
  51.         put "S" into char 2 of it
  52.       else
  53.         put "D" into char 2 of it
  54.       end if
  55.     else
  56.       get empty
  57.     end if
  58.     convert sec to long date
  59.     put jd mod 1 * 24 into arg
  60.     hm false,arg
  61.     put trunc (h+m/60+.5) into h
  62.     put shower&& char 1 to (18-nch) of spaces & sec && "at"&&h &"h" && it into line i of cd fld meteors
  63.   end repeat
  64.   ftype "meteors",14
  65. end meteor
  66.  
  67.  
  68. -- part 1 (field)
  69. -- low flags: 00
  70. -- high flags: 0002
  71. -- rect: left=29 top=77 right=303 bottom=456
  72. -- title width / last selected line: 0
  73. -- icon id / first selected line: 0 / 0
  74. -- text alignment: 0
  75. -- font id: 15036
  76. -- text size: 12
  77. -- style flags: 0
  78. -- line height: 16
  79. -- part name: meteors
  80.  
  81.  
  82. -- part 2 (field)
  83. -- low flags: 80
  84. -- high flags: 0007
  85. -- rect: left=30 top=79 right=319 bottom=293
  86. -- title width / last selected line: 0
  87. -- icon id / first selected line: 0 / 0
  88. -- text alignment: 0
  89. -- font id: 3
  90. -- text size: 12
  91. -- style flags: 0
  92. -- line height: 16
  93. -- part name: Data
  94.  
  95.  
  96. -- part 3 (button)
  97. -- low flags: 00
  98. -- high flags: 0004
  99. -- rect: left=466 top=148 right=188 bottom=509
  100. -- title width / last selected line: 0
  101. -- icon id / first selected line: 4450 / 4450
  102. -- text alignment: 1
  103. -- font id: 0
  104. -- text size: 12
  105. -- style flags: 0
  106. -- line height: 16
  107. -- part name: New Button
  108. ----- HyperTalk script -----
  109. on mouseUp
  110.   meteor
  111. end mouseUp
  112.  
  113.  
  114.  
  115. -- part 4 (field)
  116. -- low flags: 00
  117. -- high flags: 0000
  118. -- rect: left=335 top=41 right=72 bottom=414
  119. -- title width / last selected line: 0
  120. -- icon id / first selected line: 0 / 0
  121. -- text alignment: 0
  122. -- font id: 14991
  123. -- text size: 24
  124. -- style flags: 0
  125. -- line height: 32
  126. -- part name: year
  127.  
  128.  
  129. -- part 5 (button)
  130. -- low flags: 00
  131. -- high flags: 8003
  132. -- rect: left=348 top=21 right=37 bottom=428
  133. -- title width / last selected line: 0
  134. -- icon id / first selected line: 0 / 0
  135. -- text alignment: 1
  136. -- font id: 0
  137. -- text size: 12
  138. -- style flags: 0
  139. -- line height: 16
  140. -- part name: Show Data
  141. ----- HyperTalk script -----
  142. on mouseUp
  143.   if short name of me contains "Show" then
  144.     set name of me to "Hide Data"
  145.     show cd fld data
  146.   else
  147.     set name of me to "Show Data"
  148.     hide cd fld data
  149.   end if
  150. end mouseUp
  151.  
  152.  
  153.  
  154. -- part contents for card part 2
  155. ----- text -----
  156. Quadrantids,282.9,-.4,285.3
  157. Lyrids,31.7,.06,393.9
  158. Eta Aquariids,44,0.3,406.6
  159. June Lyrids,84.5,.06,447.9
  160. S. Delta Aquariids,125,-1,491.2
  161. N. Delta Aquariids,139,-1,505.2
  162. Perseids,139.2,.03,506
  163. Orionids,207.7,.4,576.2
  164. Taurids,220,.44,588.5
  165. Leonids,234.3,1.5,602.7
  166. Geminids,261.4,0,629.5
  167. 1990
  168.  
  169. -- part contents for card part 4
  170. ----- text -----
  171. (1990)
  172.  
  173. -- part contents for background part 11
  174. ----- text -----
  175. Sidereal Time = 5:46
  176. 5.766832
  177.  
  178. -- part contents for background part 12
  179. ----- text -----
  180. Universal Time = 21:22
  181. 21.377222
  182.  
  183. -- part contents for card part 1
  184. ----- text -----
  185. Quadrantids        Wednesday, January 3, 1990 at 18h EST
  186. Lyrids             Sunday, April 22, 1990 at 12h EDT
  187. Eta Aquariids      Saturday, May 5, 1990 at 6h EDT
  188. June Lyrids        Saturday, June 16, 1990 at 8h EDT
  189. S. Delta Aquariids Saturday, July 28, 1990 at 8h EDT
  190. N. Delta Aquariids Saturday, August 11, 1990 at 23h EDT
  191. Perseids           Sunday, August 12, 1990 at 14h EDT
  192. Orionids           Sunday, October 21, 1990 at 22h EDT
  193. Taurids            Saturday, November 3, 1990 at 6h EST
  194. Leonids            Saturday, November 17, 1990 at 22h EST
  195. Geminids           Friday, December 14, 1990 at 1h EST